<div id="content">
	<div class="row s_page_title">
		<sa-big-breadcrumbs [items]="['日志信息管理','安装审核记录']" icon="fa fa-tag" class="col-xs-12 col-sm-7 col-md-7 col-lg-4"></sa-big-breadcrumbs>
	</div>
	<sa-widgets-grid>
		<div class="s_table">
			<div sa-widget [editbutton]="false" color="darken" class="clearfix">
				<header><span class="widget-icon"> <i class="fa fa-table"></i> </span><h2>安装审核记录</h2></header>
				<div>
					<div class="widget-body no-padding">
						<div class="page-header clearfix s_table_opreation">
							<div class="left page-header-btn" style="width: calc(100% - 230px);">
								<div class="top_module top_module_box">
									<span class="module_text">车牌号码</span>
									<div class="s_hover_box">
										<select   class="select2"  id="carNumberSelect2">
											<option value=''></option>
										</select>
										<div class="s_del_icon" (click)='del_carNumber()'>x</div>
									</div>
								</div>
								<div class="top_module top_module_box">
                                    <span class="top_module_label module_text">图片类型</span>
                                    <select name="" class="top_module_select" [(ngModel)]="tableParam.index">
                                        <option value="">全部</option>
                                        <option value="1">车辆正面</option>
                                        <option value="2">车辆侧面</option>
                                        <option value="3">主机</option>
                                        <option value="4">传感器</option>
                                        <option value="5">天线</option>
                                        <option value="7">电源</option>
                                        <option value="6">其他</option>
                                    </select>
								</div>
								<div class="top_module top_module_box">
                                    <span class="top_module_label module_text">图片质量</span>
                                    <select name="" class="top_module_select" [(ngModel)]="tableParam.quality">
                                        <option value="">全部</option>
                                        <option value="合格">合格</option>
                                        <!--<option value="中">中</option>-->
                                        <option value="不合格">不合格</option>
                                    </select>
								</div>
								<div class="selectDate top_module">
									<table-select-date [notInit]='false' (outerTime)="dateSelect($event)" ></table-select-date>
								</div>
								<!--<div class="top_module">
									<span class="module_text">选择天数</span>
									<select name="" id="" class="module_inp"  [(ngModel)]="dateNumber" (change)='selectDate()'>
										<option value="0">请选择</option>
										<option value="10">近10天</option>
										<option value="20">近20天</option>
										<option value="30">近30天</option>
										<option value="60">近60天</option>
										<option value="90">近90天</option>
										<option value="100">近100天</option>
									</select>
								</div>-->
								<button class="btn btn-primary" (click)="tableSearch()">查询</button>
								<button type="button" class="btn btn-primary" (click)="exportData()">导出</button>
							</div>
							<div class="right top-search">
								<input type="text" [(ngModel)]="tableParam.searchKey" (change)="tableSearch()" class="search-input" placeholder="车牌号/评审人">
								<span class="top-search-box">
							        <button class="top-search-btn" type="button" (click)="tableSearch()"> <i class="fa fa-search"></i></button>
							    </span>
							</div>
						</div>
						<div class="table_scroll">
							<table class="display dataTables responsive table table-striped table-bordered table-hover dataTable s_h5_table">
								<thead>
									<tr>
										<th>车牌号码</th>
										<th>设备ID</th>
                                        <th>图片类型</th>
										<th>审核质量</th>
										<th>审核意见</th>
										<th>评审人</th>
										<th>评审时间</th>
									</tr>
								</thead>
								<tbody>
									<tr *ngFor="let row of tableData" >
										<td>{{row.carNumber}}</td>
										<td>{{row.deviceId}}</td>
										<td>
										    <span>{{row.type}}</span>
										    <button type="button" (click)="open_img(row,ImgModal)" *ngIf="row.imageUrl && row.imageUrl.length > 0">查看</button>
									    </td>
										<td>
										    <span [ngClass]="{'green': row.quality == '合格','red': row.quality == '不合格'}">{{row.quality}}</span>
										</td>
										<td>{{row.describe}}</td>
										<td>{{row.auditName}}</td>
										<td>{{row.auditDate}}</td>
									</tr>
								</tbody>
							</table>
						</div>
						<div class="table-fix clearfix">
							<paginator [totalRecords]="totalCount"
						           [rows]="pageSize"
						           [currentPage]="curPage - 1"
						           (onPageChange)="paginate($event)">
							</paginator>
							<button type="button" class="btn default refresh_btn" (click)="refresh()"><i class="fa fa-refresh"></i></button>
						</div>
					</div>
				</div>
			</div>
		</div>
	</sa-widgets-grid>
	   <!-- 图片查看   弹窗-->
    <section bsModal #ImgModal="bs-modal" class="modal fade" tabindex="-1" role="dialog" aria-labelledby="myLargeModalLabel" aria-hidden="true">
        <div class="modal-dialog modal-lg">
            <div class="modal-content">
                <div class="modal-header">
                    <button type="button" class="close" (click)="imgClose(ImgModal)" aria-label="Close"><span aria-hidden="true">&times;</span></button>     
                    <h4 class="modal-title">{{imageType}}图片</h4>
                </div>
                <div class="modal-body" style="max-height: 520px; overflow: auto;padding-top: 0;">
                    <div class="row form-horizontal imagesInfo" *ngIf='imagesInfo.length != 0'>
                        <div class="imagesList imagesList-sensor">
                            <div class="imagesInfoFile">
                                <div class="imgFileList">
                                    <label class="imgTitle">{{imageType}}</label>
                                    <div class="imgContList">
                                        <div class="imgCont" *ngFor="let row of imagesInfo" (click)="bigimg(ImgBigModal,row)">
                                            <img class="imgSrc" [src]="row" [alt]="imageType"/>
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </section>
    <!-- 图片查看 弹窗end-->
</div>